knitr::opts_chunk$set(echo = TRUE)
Under the structure of Bass-SIR model, we provide three models in the family for fitting
library(BassSIR)
We use the data of COVID-19 in Hubei as an example
cases <- as_bass_data(n_covid19$Hubei, id = "Hubei")
est1 <- BassSIR::fit(cases, r_rec = 1/22.2, r_death = 1/22.3, type = "BassSIR") est2 <- BassSIR::fit(cases, r_rec = 1/22.2, r_death = 1/22.3, type = "SIR") est3 <- BassSIR::fit(cases, r_rec = 1/22.2, r_death = 1/22.3, type = "Growth")
summary(est1)
summary(est2)
summary(est3)
compare_models(BassSIR = est1, SIR = est2, Growth = est3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.